package com.sdp.khy.baotou.db.khy_emp.service.impl;

import com.sdp.khy.baotou.db.khy_emp.entity.KhyEmp;
import com.sdp.khy.baotou.db.khy_emp.mapper.KhyEmpMapper;
import com.sdp.khy.baotou.db.khy_emp.service.IKhyEmpService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zsp
 * @since 2023-11-29
 */
@Service
public class KhyEmpServiceImpl extends ServiceImpl<KhyEmpMapper, KhyEmp> implements IKhyEmpService {

	@Override
	public KhyEmp queryKhyEmpByEmpNo(String empNo) {
		LambdaQueryWrapper<KhyEmp> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(KhyEmp::getEmpNo, empNo);
		return getOne(queryWrapper,false);
	}

	@Override
	public List<KhyEmp> queryKhyEmpByEmpPost(String empPost) {
		LambdaQueryWrapper<KhyEmp> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(KhyEmp::getEmpPost, empPost);
		return list(queryWrapper);
	}

}
